﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;

namespace Teigha.Core
{
	public class OdGeMatrix3d : IDisposable
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdGeMatrix3d(IntPtr cPtr, bool cMemoryOwn)
		{
			this.swigCMemOwn = cMemoryOwn;
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdGeMatrix3d obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdGeMatrix3d()
		{
			this.Dispose();
		}

		public virtual void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							GlobalsPINVOKE.delete_OdGeMatrix3d(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
		}

		public OdGeMatrix3d() : this(GlobalsPINVOKE.new_OdGeMatrix3d(), MemoryManager.GetMemoryManager().GetCurrentTransaction() == null)
		{
			MemoryTransaction currentTransaction = MemoryManager.GetMemoryManager().GetCurrentTransaction();
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdGeMatrix3d(this.swigCPtr.Handle, true));
			}
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public double this[int row, int column]
		{
			get
			{
				return this.GetItem(row, column);
			}
			set
			{
				GlobalsPINVOKE.OdGeMatrix3d_entry_set(this.swigCPtr, row, column, value);
			}
		}

		public static OdGeMatrix3d operator *(OdGeMatrix3d m, OdGeMatrix3d d)
		{
			return m.Mul(d);
		}

		public static OdGePoint3d operator *(OdGeMatrix3d matrix, OdGePoint3d point)
		{
			return Globals.Mul(matrix, point);
		}

		public static OdGeVector3d operator *(OdGeMatrix3d matrix, OdGeVector3d vect)
		{
			return Globals.Mul(matrix, vect);
		}

		public static OdGeMatrix3d kIdentity
		{
			get
			{
				IntPtr intPtr = GlobalsPINVOKE.OdGeMatrix3d_kIdentity_get();
				OdGeMatrix3d result = (intPtr == IntPtr.Zero) ? null : new OdGeMatrix3d(intPtr, false);
				if (GlobalsPINVOKE.SWIGPendingException.Pending)
				{
					throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
				}
				return result;
			}
		}

		public OdGeMatrix3d setToIdentity()
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToIdentity(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public void validateZero(OdGeTol tol)
		{
			GlobalsPINVOKE.OdGeMatrix3d_validateZero__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public void validateZero()
		{
			GlobalsPINVOKE.OdGeMatrix3d_validateZero__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeMatrix3d Mul(OdGeMatrix3d matrix)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_Mul__SWIG_0(this.swigCPtr, OdGeMatrix3d.getCPtr(matrix)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d preMultBy(OdGeMatrix3d leftSide)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_preMultBy(this.swigCPtr, OdGeMatrix3d.getCPtr(leftSide));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d postMultBy(OdGeMatrix3d rightSide)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_postMultBy(this.swigCPtr, OdGeMatrix3d.getCPtr(rightSide));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToProduct(OdGeMatrix3d matrix1, OdGeMatrix3d matrix2)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToProduct(this.swigCPtr, OdGeMatrix3d.getCPtr(matrix1), OdGeMatrix3d.getCPtr(matrix2));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d invert()
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_invert(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d inverse()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_inverse__SWIG_0(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d inverse(OdGeTol tol)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_inverse__SWIG_1(this.swigCPtr, OdGeTol.getCPtr(tol)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool inverse(OdGeMatrix3d inverseMatrix, double tol)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_inverse__SWIG_2(this.swigCPtr, OdGeMatrix3d.getCPtr(inverseMatrix), tol);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isSingular(OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isSingular__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isSingular()
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isSingular__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d transposeIt()
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_transposeIt(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d transpose()
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_transpose(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsEqual(OdGeMatrix3d matrix)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_IsEqual(this.swigCPtr, OdGeMatrix3d.getCPtr(matrix));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool IsNotEqual(OdGeMatrix3d matrix)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_IsNotEqual(this.swigCPtr, OdGeMatrix3d.getCPtr(matrix));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isEqualTo(OdGeMatrix3d matrix, OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isEqualTo__SWIG_0(this.swigCPtr, OdGeMatrix3d.getCPtr(matrix), OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isEqualTo(OdGeMatrix3d matrix)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isEqualTo__SWIG_1(this.swigCPtr, OdGeMatrix3d.getCPtr(matrix));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isUniScaledOrtho(OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isUniScaledOrtho__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isUniScaledOrtho()
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isUniScaledOrtho__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isScaledOrtho(OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isScaledOrtho__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isScaledOrtho()
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isScaledOrtho__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isPerspective(OdGeTol tol)
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isPerspective__SWIG_0(this.swigCPtr, OdGeTol.getCPtr(tol));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isPerspective()
		{
			bool result = GlobalsPINVOKE.OdGeMatrix3d_isPerspective__SWIG_1(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double det()
		{
			double result = GlobalsPINVOKE.OdGeMatrix3d_det(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d setTranslation(OdGeVector3d vect)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setTranslation(this.swigCPtr, OdGeVector3d.getCPtr(vect));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setCoordSystem(OdGePoint3d origin, OdGeVector3d xAxis, OdGeVector3d yAxis, OdGeVector3d zAxis)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setCoordSystem(this.swigCPtr, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(xAxis), OdGeVector3d.getCPtr(yAxis), OdGeVector3d.getCPtr(zAxis));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public void getCoordSystem(OdGePoint3d origin, OdGeVector3d xAxis, OdGeVector3d yAxis, OdGeVector3d zAxis)
		{
			GlobalsPINVOKE.OdGeMatrix3d_getCoordSystem(this.swigCPtr, OdGePoint3d.getCPtr(origin), OdGeVector3d.getCPtr(xAxis), OdGeVector3d.getCPtr(yAxis), OdGeVector3d.getCPtr(zAxis));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGePoint3d getCsOrigin()
		{
			OdGePoint3d result = new OdGePoint3d(GlobalsPINVOKE.OdGeMatrix3d_getCsOrigin(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d getCsXAxis()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeMatrix3d_getCsXAxis(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d getCsYAxis()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeMatrix3d_getCsYAxis(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d getCsZAxis()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeMatrix3d_getCsZAxis(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d setToTranslation(OdGeVector3d vect)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToTranslation(this.swigCPtr, OdGeVector3d.getCPtr(vect));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToRotation(double angle, OdGeVector3d axis, OdGePoint3d center)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToRotation__SWIG_0(this.swigCPtr, angle, OdGeVector3d.getCPtr(axis), OdGePoint3d.getCPtr(center));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToRotation(double angle, OdGeVector3d axis)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToRotation__SWIG_1(this.swigCPtr, angle, OdGeVector3d.getCPtr(axis));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToScaling(double scale, OdGePoint3d center)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToScaling__SWIG_0(this.swigCPtr, scale, OdGePoint3d.getCPtr(center));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToScaling(double scale)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToScaling__SWIG_1(this.swigCPtr, scale);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToScaling(OdGeScale3d scale, OdGePoint3d center)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToScaling__SWIG_2(this.swigCPtr, OdGeScale3d.getCPtr(scale), OdGePoint3d.getCPtr(center));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToScaling(OdGeScale3d scale)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToScaling__SWIG_3(this.swigCPtr, OdGeScale3d.getCPtr(scale));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToMirroring(OdGePlane mirrorPlane)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToMirroring__SWIG_0(this.swigCPtr, OdGePlane.getCPtr(mirrorPlane));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToMirroring(OdGePoint3d mirrorPoint)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToMirroring__SWIG_1(this.swigCPtr, OdGePoint3d.getCPtr(mirrorPoint));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToMirroring(OdGeLine3d mirrorLine)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToMirroring__SWIG_2(this.swigCPtr, OdGeLine3d.getCPtr(mirrorLine));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToProjection(OdGePlane projectionPlane, OdGeVector3d projectDir)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_setToProjection(this.swigCPtr, OdGePlane.getCPtr(projectionPlane), OdGeVector3d.getCPtr(projectDir)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d setToAlignCoordSys(OdGePoint3d fromOrigin, OdGeVector3d fromXAxis, OdGeVector3d fromYAxis, OdGeVector3d fromZAxis, OdGePoint3d toOrigin, OdGeVector3d toXAxis, OdGeVector3d toYAxis, OdGeVector3d toZAxis)
		{
			OdGeMatrix3d odGeMatrix3d = new OdGeMatrix3d();
			GlobalsPINVOKE.OdGeMatrix3d_setToAlignCoordSys(this.swigCPtr, OdGePoint3d.getCPtr(fromOrigin), OdGeVector3d.getCPtr(fromXAxis), OdGeVector3d.getCPtr(fromYAxis), OdGeVector3d.getCPtr(fromZAxis), OdGePoint3d.getCPtr(toOrigin), OdGeVector3d.getCPtr(toXAxis), OdGeVector3d.getCPtr(toYAxis), OdGeVector3d.getCPtr(toZAxis));
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			for (int i = 0; i < 4; i++)
			{
				for (int j = 0; j < 4; j++)
				{
					odGeMatrix3d[i, j] = this[i, j];
				}
			}
			return odGeMatrix3d;
		}

		public OdGeMatrix3d setToWorldToPlane(OdGeVector3d normal)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_setToWorldToPlane__SWIG_0(this.swigCPtr, OdGeVector3d.getCPtr(normal)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d setToWorldToPlane(OdGePlane plane)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_setToWorldToPlane__SWIG_1(this.swigCPtr, OdGePlane.getCPtr(plane)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d setToPlaneToWorld(OdGeVector3d normal)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_setToPlaneToWorld__SWIG_0(this.swigCPtr, OdGeVector3d.getCPtr(normal)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix3d setToPlaneToWorld(OdGePlane plane)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_setToPlaneToWorld__SWIG_1(this.swigCPtr, OdGePlane.getCPtr(plane)), false);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d translation(OdGeVector3d vect)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_translation__SWIG_0(OdGeVector3d.getCPtr(vect)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d translation()
		{
			OdGeVector3d result = new OdGeVector3d(GlobalsPINVOKE.OdGeMatrix3d_translation__SWIG_1(this.swigCPtr), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d rotation(double angle, OdGeVector3d axis, OdGePoint3d center)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_rotation__SWIG_0(angle, OdGeVector3d.getCPtr(axis), OdGePoint3d.getCPtr(center)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d rotation(double angle, OdGeVector3d axis)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_rotation__SWIG_1(angle, OdGeVector3d.getCPtr(axis)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d scaling(double scale, OdGePoint3d center)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_scaling__SWIG_0(scale, OdGePoint3d.getCPtr(center)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d scaling(double scale)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_scaling__SWIG_1(scale), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d scaling(OdGeScale3d scale, OdGePoint3d center)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_scaling__SWIG_2(OdGeScale3d.getCPtr(scale), OdGePoint3d.getCPtr(center)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d scaling(OdGeScale3d scale)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_scaling__SWIG_3(OdGeScale3d.getCPtr(scale)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d mirroring(OdGePlane mirrorPlane)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_mirroring__SWIG_0(OdGePlane.getCPtr(mirrorPlane)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d mirroring(OdGePoint3d mirrorPoint)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_mirroring__SWIG_1(OdGePoint3d.getCPtr(mirrorPoint)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d mirroring(OdGeLine3d mirrorLine)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_mirroring__SWIG_2(OdGeLine3d.getCPtr(mirrorLine)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d projection(OdGePlane projectionPlane, OdGeVector3d projectDir)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_projection(OdGePlane.getCPtr(projectionPlane), OdGeVector3d.getCPtr(projectDir)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d alignCoordSys(OdGePoint3d fromOrigin, OdGeVector3d fromXAxis, OdGeVector3d fromYAxis, OdGeVector3d fromZAxis, OdGePoint3d toOrigin, OdGeVector3d toXAxis, OdGeVector3d toYAxis, OdGeVector3d toZAxis)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_alignCoordSys(OdGePoint3d.getCPtr(fromOrigin), OdGeVector3d.getCPtr(fromXAxis), OdGeVector3d.getCPtr(fromYAxis), OdGeVector3d.getCPtr(fromZAxis), OdGePoint3d.getCPtr(toOrigin), OdGeVector3d.getCPtr(toXAxis), OdGeVector3d.getCPtr(toYAxis), OdGeVector3d.getCPtr(toZAxis)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d worldToPlane(OdGeVector3d normal)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_worldToPlane__SWIG_0(OdGeVector3d.getCPtr(normal)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d worldToPlane(OdGePlane arg0)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_worldToPlane__SWIG_1(OdGePlane.getCPtr(arg0)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d planeToWorld(OdGeVector3d normal)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_planeToWorld__SWIG_0(OdGeVector3d.getCPtr(normal)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdGeMatrix3d planeToWorld(OdGePlane arg0)
		{
			OdGeMatrix3d result = new OdGeMatrix3d(GlobalsPINVOKE.OdGeMatrix3d_planeToWorld__SWIG_1(OdGePlane.getCPtr(arg0)), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double scale()
		{
			double result = GlobalsPINVOKE.OdGeMatrix3d_scale(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double norm()
		{
			double result = GlobalsPINVOKE.OdGeMatrix3d_norm(this.swigCPtr);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeMatrix2d convertToLocal(OdGeVector3d normal, out double elevation)
		{
			OdGeMatrix2d result = new OdGeMatrix2d(GlobalsPINVOKE.OdGeMatrix3d_convertToLocal(this.swigCPtr, OdGeVector3d.getCPtr(normal), out elevation), true);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double GetItem(int row, int column)
		{
			double result = GlobalsPINVOKE.OdGeMatrix3d_GetItem(this.swigCPtr, row, column);
			if (GlobalsPINVOKE.SWIGPendingException.Pending)
			{
				throw GlobalsPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		protected bool swigCMemOwn;
	}
}
